<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>easyIM-WEB版客户端-登录</title>

    <!-- Favicon -->
    <link rel="icon" href="./dist/media/img/favicon.png" type="image/png">

    <!-- Soho css -->
    <link rel="stylesheet" href="static/dist/css/soho.min.css">
</head>
<body class="form-membership">

<div class="form-wrapper">

    <!-- logo -->
    <div class="logo">
        <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
             width="50.004px" height="50.003px" viewBox="0 0 33.004 33.003"
             style="enable-background:new 0 0 33.004 33.003;"
             xml:space="preserve">
            <g>
                <path d="M4.393,4.788c-5.857,5.857-5.858,15.354,0,21.213c4.875,4.875,12.271,5.688,17.994,2.447l10.617,4.161l-4.857-9.998
                    c3.133-5.697,2.289-12.996-2.539-17.824C19.748-1.072,10.25-1.07,4.393,4.788z M25.317,22.149l0.261,0.512l1.092,2.142l0.006,0.01
                    l1.717,3.536l-3.748-1.47l-0.037-0.015l-2.352-0.883l-0.582-0.219c-4.773,3.076-11.221,2.526-15.394-1.646
                    C1.469,19.305,1.469,11.481,6.277,6.672c4.81-4.809,12.634-4.809,17.443,0.001C27.919,10.872,28.451,17.368,25.317,22.149z"/>
                <g>
                    <circle cx="9.835" cy="16.043" r="1.833"/>
                    <circle cx="15.502" cy="16.043" r="1.833"/>
                    <circle cx="21.168" cy="16.043" r="1.833"/>
                </g>
            </g>
            <g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g>
        </svg>
    </div>
    <!-- ./ logo -->

    <h5>登录</h5>

    <!-- form -->
    <div>
        <div class="form-group input-group-lg">
            <input id="user-auid" type="text" class="form-control" placeholder="用户auid" required autofocus>
        </div>
        <div class="form-group input-group-lg">
            <input id="user-token" type="password" class="form-control" placeholder="用户token" required>
        </div>
        <div class="form-group d-flex justify-content-between">
            <div class="custom-control custom-checkbox">
                <input type="checkbox" class="custom-control-input" checked="" id="customCheck1">
                <label class="custom-control-label" for="customCheck1">记住我</label>
            </div>
            <!--<a href="#">重置密码</a>-->
        </div>
        <button onclick="doLogin()" class="btn btn-primary btn-lg btn-block">登录</button>
    </div>
    <!-- ./ form -->

</div>

<!-- JQuery -->
<script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>

<!-- Popper.js -->
<script src="static/vendor/popper.min.js"></script>

<!-- Bootstrap -->
<script src="static/vendor/bootstrap/bootstrap.min.js"></script>

<!-- Soho -->
<script src="static/dist/js/soho.min.js"></script>

<!-- Cookie -->
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>

<script>
    function doLogin() {
        const userAuid = document.getElementById('user-auid');
        const userToken = document.getElementById('user-token');
        if(!userAuid.value || !userToken.value){
            alert('请输入用户auid或token');
            return;
        }
        Cookies.set("userAuid", userAuid.value);
        Cookies.set("userToken", userToken.value);
        window.location.href = "app.html";

        return false;
    }

</script>

</body>
</html>
